/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.abdul.corejsf3rd;

import java.io.Serializable;
import java.util.Calendar;

/**
 *
 * @author Abdul
 */
@javax.faces.bean.ManagedBean(name="user")
@javax.faces.bean.SessionScoped
public class UserBean implements Serializable {
    
    private String name;
    private String password;
    private String greeting=" Learning JSF is fun .. isn't it !!";

    public String getGreeting() {
       return (name==null || name.trim().equals("")) ?"":"Hello "+ name +greeting + "   " + Calendar.getInstance().getTime();
    }

    public void setGreeting(String greeting) {
        this.greeting = greeting;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    
    
    
}
